import { compile } from './compiler/compile'
import {
    createApp,
    render,
    h,
    Text,
    Fragment,
    nextTick,
    renderList,
    resolveComponent
} from './runtime'
import { reactive, ref, computed, effect } from './reactive'
import { generate } from './compiler/codegen';
export const MiniVue = (window.MiniVue = {
    createApp,
    render,
    h,
    Text,
    Fragment,
    nextTick,
    reactive,
    ref,
    computed,
    effect,
    compile,
    renderList,
    resolveComponent
})
// const Item = {
//     render(ctx) {
//         return [
//             h('div', null, '132')
//         ]
//     }
// }
// const Cmp = {
//     components: { Item },
//     setup() {
//         const count = ref(0)
//         const add = () => {
//             count.value++
//         }
//         return {
//             count,
//             add
//         }
//     },
//     render(ctx) {
//         return [
//             h(Item),
//             h('h1', null, ctx.count.value),
//             h('button', { onClick: ctx.add }, 'add')
//         ]
//     }
// }

// const vnode = h(Cmp)
// render(vnode, document.body)



